<!-- Box 2 -->
            <!--// bof: specials //-->
            <div class="right-box" id="loginBox">
                <div class="box_head">
                    <div class="inner1">
                        <div class="inner2">
                            <div class="inner3">
                                <h2><a>Đăng nhập</a></h2>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="box">
                    <div class="inner1">
                        <div class="box-indent">
                            <div class="box1_body">
                                <div id="LoginArea" class="sideBoxContent centeredContent">
                                    <form id="login" name="login" ajaxify="<?php echo $this->url->action("login", "ProductPage");?>" ajaxrel="<?php echo $this->url->action("customerPanel", "ProductPage")?>">
                                    	<p><label>Tên đăng nhập</label></p>
                                    	<p><input type="text" id="user_name" name="user_name"/></p>
                                    	<p><label>Mật khẩu</label></p>
                                    	<p><input type="password" id="pass_word" name="pass_word"/></p>
                                    	<p>
                                    		<input class="button-gray" type="submit" value="Đăng nhập"/>
                                    		<input onclick="register();" class="button-gray" type="button" value="Đăng ký" />
                                    	</p>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
	<script type="text/javascript">
	    function register()
	    {
		    window.location.href = "<?php echo $this->url->action("register", "Index")?>";
	    }
	    $(document).ready(function(){
			$("#login").submit(function(){
		    	data = {
		    			username: $("#user_name").val(),
		    			password: $("#pass_word").val()
		            };
		    		$.ajax({
			    		url: $(this).attr("ajaxify"),
		        		data: data,
		        		type: "POST",
		        		dataType: "json",
		        		success: function(response){
		    				if(response.success)
		    				{
			    				$.get($("#login").attr('ajaxrel'), function(gres){
			    					$("#loginBox").html(gres);
				    			});
		    				}
		    				else
		    				{
								Boxy.alert(response.message);
			    			}
		            	}
		        	});
		        return false;
			});
	    });
    </script>